home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / HAVN_FUN.DMO < prev    next >
Text File  |  1996-07-04  |  4KB  |  95 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   HAVN_FUN.DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16.  Just throwing some ideas around here. Have a look.
  17.  
  18. $endif
  19.  
  20. '.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
  21. ' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
  22.  
  23. $INCLUDE "DAS-NB01.INC"
  24. $INCLUDE "DAS-NB02.INC"
  25. $INCLUDE "DAS-NBV1.INC"
  26. $INCLUDE "DAS-NBV3.INC"
  27.  
  28. FileName$ = "DMO\V-FONT.850"
  29.  
  30. IF DIR$( FileName$ ) = "" THEN
  31.   PRINT "COULDN'T FIND THE FONT FILE"
  32.   END
  33. END IF
  34.  
  35. FileNo% = FREEFILE
  36. OPEN "B", #FileNo%, FileName$
  37. IF LOF( FileNo% ) = 5120 THEN
  38.   Handle% = FILEATTR( FileNo%, 2 )
  39.   REDIM sVFont%(9,255)
  40.   fReadBLOCK Handle%, sVFont%(0,0), 5120
  41. END IF
  42. CLOSE #FileNo%
  43.  
  44. IF FileNo% = 0 THEN
  45.   PRINT "SOMETHING WENT WRONG!
  46.   END
  47. END IF
  48.  
  49. SCREEN 12
  50. GraphicSETUP
  51. CLS
  52. OldPalette$ = fLoadDAScolor$
  53. GCOLOR 15, 0
  54. Test$ = "A quick brown fox jumps over the lazy dog."
  55. LOCATE 1, 1 : PRINT Test$
  56.  
  57.                                                '┌───────────────────────────
  58. Col% = 0 : Row% = 16                           '│ NORMAL
  59. FOR X% = 1 TO LEN( Test$ )                     '│ once for each character
  60.   A% = fASCII%( Test$, X% )                    '│ get ASCII value
  61.   Col% = fPutFBarr%( Col%,Row%,sVfont%(0,A%) ) '│ put it & get next column
  62. NEXT                                           '│
  63.                                                '├───────────────────────────
  64. Col% = 1 : Row% = 48                           '│ OUTLINE LETTERS
  65.                                                '│
  66. FOR X% = 1 TO LEN( Test$ )                     '│ once for each letter
  67.   A% = fASCII%( Test$, X% )                    '│ get the ASCII value
  68.   IF A% = 32 THEN                              '│ if it is a space then
  69.     INCR Col%, 8                               '│   simply incr cols &
  70.     ITERATE                                    '│   go
  71.   END IF                                       '│
  72.   FOR C% = Col% - 1 TO Col% + 1                '│ 3 columns ┐ total of
  73.     FOR R% = Row% - 1 TO Row% + 1              '│ 3 row     ┘ 9 printings
  74.       PutCarr C%, R%, sVfont%(0,A%), 1, 15     '│ OR on the outline in black
  75.     NEXT                                       '│
  76.   NEXT                                         '│
  77.   PutCarr Col%, Row%, sVfont%(0,A%), 0,  4     '│ AND on the inside in Yellow
  78.   INCR Col%, 9                                 '│ next column
  79. NEXT                                           '├───────────────────────────
  80.                                                '│
  81. Col% = 1 : Row% = 80                           '│ SHADOWED LETTERS
  82. FOR X% = 1 TO LEN( Test$ )                     '│ once for each letter
  83.   A% = fASCII%( Test$, X% )                    '│ get the ASCII value
  84.   IF A% <> 32 THEN                             '│ if it is a space then
  85.     PutCarr Col%+1, Row%+1, sVfont%(0,A%),3,15 '│
  86.     PutCarr Col%  , Row%  , sVfont%(0,A%),3,10 '│ AND on the inside in Yellow
  87.   END IF                                       '│
  88.   INCR Col%, 8                                 '│ next column
  89. NEXT                                           '└───────────────────────────
  90.  
  91. fAnyKey
  92. CLS
  93. DACwriteSTR OldPalette$
  94. SCREEN 0
  95.